<?php

use yii\db\Migration;

/**
 * Class m180109_093232_add_column_to_package_transfer_history_20180109
 */
class m180109_093232_add_column_to_package_transfer_history_20180109 extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
		//$this->addColumn('project','type2',$this->smallInteger()->defaultValue(0)->comment('类型'));
        /*资产包流转信息 添加锁表的标志*/
        $this->addColumn('package_transfer_history','lock_user',$this->integer()->comment('上锁用户'));
        $this->addColumn('package_transfer_history','lock_timestamp',$this->string()->comment('上锁时间'));
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo "m180109_093232_add_column_to_package_transfer_history_20180109 cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180109_093232_add_column_to_package_transfer_history_20180109 cannot be reverted.\n";

        return false;
    }
    */
}
